package com.example.demo.feign;

import com.example.demo.entity.Blog;
import com.example.demo.service.BlogService;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class BlogClient implements IBlogClient{
	BlogService blogService;
	@Override
	@GetMapping(API_PREFIX + "/detail")
	public R<Blog> detail(Integer id) {
		int cnt=100/0;
		return R.data(blogService.getById(id));
	}
}
